<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Document</title>
  <link rel="stylesheet" href="/public/css/index.css" />
</head>

<body>
  <div id="app">
    <header class="app-header">
      <div class="container clearfix">
        <div class="header-logo">
          <a href="index.html" title="" class="logo ir">小米官网</a>
        </div>
        <div class="header-nav fl">
          <ul class="nav-list clearfix">
            {% for category in categories%}
            <li class="header-item">
              <a href="" class="link">
                <span class="text">{{category.name}}</span>
              </a>
            </li>
            {% endfor %}
          </ul>
        </div>
        <ul class="header-user fr">
          <li class="header-item">
            <a href="" class="link">
              <span class="text">注册</span>
            </a>
          </li>
          <li class="header-item">
            <a href="" class="link">
              <span class="text">登录</span>
            </a>
          </li>
          <li class="header-item">
            <a href="" class="link">
              <span class="text">zMouse</span>
            </a>
          </li>
        </ul>
      </div>
    </header>

    <div class="main">
      <div class="container">
        {% for category in categories%}
        <div class="brick-box">
          <div class="h">
            <h2 class="title">{{category.name}}</h2>
            <div class="more">
              <a href="">更多</a>
            </div>
          </div>
          <div class="c clearfix">
            <ul class="list clearfix">
              {% for item in items %}
              {% if item.category_id == category.id %}
              <li class="item">
                <a href="">
                  <div class="figure">
                    <img src="/public/images/{{item.cover}}" alt="" />
                  </div>
                  <h3 class="title">{{item.name}}</h3>
                  <p class="desc">一亿像素夜景相机，120Hz六档变速高刷屏</p>
                  <p class="price"><span class="num">{{item.price}}</span>元</p>
                </a>
              </li>
              {% endif %}
              {% endfor %}
            </ul>
          </div>
        </div>
        {% endfor %}
      </div>
    </div>

    <footer class="app-footer">
      <div class="container">
        <div class="links clearfix">
          <dl class="links-col">
            <dt>帮助中心</dt>
            <dd>账户管理</dd>
            <dd>购物指南</dd>
            <dd>订单操作</dd>
          </dl>
          <dl class="links-col">
            <dt>帮助中心</dt>
            <dd>账户管理</dd>
            <dd>购物指南</dd>
            <dd>订单操作</dd>
          </dl>
          <dl class="links-col">
            <dt>帮助中心</dt>
            <dd>账户管理</dd>
            <dd>购物指南</dd>
            <dd>订单操作</dd>
          </dl>
          <dl class="links-col">
            <dt>帮助中心</dt>
            <dd>账户管理</dd>
            <dd>购物指南</dd>
            <dd>订单操作</dd>
          </dl>
        </div>
      </div>
    </footer>
  </div>
</body>

</html>
